<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Common extends MY_Controller {

	/**
	 * 商家model
	 * @var MerchantUserModel
	 */
	public $mMerchant;
	public function __construct(){
		parent::__construct();		
	}
	
	/**
	 * 搜索用户
	 */
	public function searchUserName(){
		$keyword = get('keyword');
		
		$this->loadModel('MerchantUserModel', 'mMerchant', 'merchant');
		$tA = $this->mMerchant->getInfoByLikeName($keyword, $this->countyItem);
		echo json_encode($tA);
	}
	
	/**
	 * 搜索用户
	 */
	public function getCustomList(){
		$merchantId = get('merchant_id');
		
		$this->loadModel('ConsumerCategoryModel', 'mCategory', 'consumer');
		$tA = $this->mCategory->getCustomList($merchantId);
		echo json_encode($tA);
	}
}
	
